﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Linq;
using System.Xml;
using Aulac.Global.Enums; 
using Aulac.Global.Data; 
using Aulac.Global.Common; 
using Aulac.Global.Xml;
using Aulac.Rsc.Ems; using Aulac.Rsc.Ems.Tags;
using Aulac.Client.Data.Helper;
using Aulac.Verb.Ems;
using Aulac.Global.AccessRight;
using Aulac.Rsc;

namespace Aulac.Client.Ems.WinForm.Stores
{
    public partial class FormRelsMdnStore : Aulac.Client.Controls.Forms.Ems.FormEmsDataVchBase
    {
        public FormRelsMdnStore()
        {
            InitializeComponent();            
            Init();
            SetFieldMember();
        }

        #region Listents
        private void txtTaxRate_TextChanged(object sender, EventArgs e)
        {
            grdLine.TaxRate = txtTaxRateH.Double;
            grdLine.CalcAllRowsAmtItemLine(tagVch.Inv.TaxRate);
            grdLine.SetTotalSummary();
        }


        private void cbTagStoreType_ValueControlChanged(object sender, EventArgs e)
        {
            switch (cbTagStoreType.TagStoreTypeID)
            {
                //case TagStoreTypes.None:
                //    break;
                //case TagStoreTypes.InputBuy:
                //    cboStoreRec.SetStoreTypes(StoreTypes.Buseniss, StoreTypes.Program, StoreTypes.Other, StoreTypes.Manager);
                //    break;
                //case TagStoreTypes.InputRepair:
                //    cboStoreRec.SetStoreTypes();
                //    //cbRscFnc.RscFncPrkID = "";
                //    //cbRscFnc.Enabled = false;
                //    break;
                //case TagStoreTypes.InputOther:
                //    break;
                //case TagStoreTypes.InputOfProgram:
                //    cboStoreRec.SetStoreTypes(StoreTypes.Program);
                //    break;                
            }
        }

        #endregion

        private void tabControlBase_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (tabControlBase.SelectedTab == tabPgList)
                InitGrd();
        }
    }
}
